﻿@model NationalIT.Customer_Info
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "Customer Info";
}
<h3>
    Customer Info</h3>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.ValidationSummary(true)                
    <div class="row-fluid">
        <div class="span6">
            <div class="control-group">
                <label for="Customer_ID">
                    Customer_ID</label>
                @Html.TextBoxFor(model => model.Customer_ID, new { @class = "input-xlarge", @readonly="true" })
                @Html.ValidationMessageFor(model => model.Customer_ID)
            </div>
            <div class="control-group">
                <label for="Street">
                    Street</label>
                @Html.TextBoxFor(model => model.Street, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Street)
            </div>
            <div class="control-group">
                <label for="City">
                    City</label>
                @Html.TextBoxFor(model => model.City, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.City)
            </div>
            <div class="control-group">
                <label for="Phone">
                    Phone</label>
                @Html.TextBoxFor(model => model.Phone, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Phone)
            </div>
            <div class="control-group">
                <label for="Contact">
                    Contact</label>
                @Html.TextBoxFor(model => model.Contact, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Contact)
            </div>
        </div>
        <div class="span6">
            <div class="control-group">
                <label for="Customer_Name">
                    Customer_Name</label>
                @Html.TextBoxFor(model => model.Customer_Name, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Customer_Name)
            </div>
            <div class="control-group">
                <label for="ZIP_Code">
                    ZIP_Code</label>
                @Html.TextBoxFor(model => model.ZIP_Code, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.ZIP_Code)
            </div>
            <div class="control-group">
                <label for="State">
                    State</label>
                @Html.TextBoxFor(model => model.State, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.State)
            </div>
            <div class="control-group">
                <label for="Fax">
                    Fax</label>
                @Html.TextBoxFor(model => model.Fax, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Fax)
            </div>
            <div class="control-group">
                <label for="Days_to_pay">
                    Days_to_pay</label>
                @Html.TextBoxFor(model => model.Days_to_pay, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Days_to_pay)
            </div>
        </div>
    </div> 
    <div class="row-fluid">
        <div class="span12">
            <div class="control-group">
                <label for="Comments">
                    Comments</label>
                @Html.TextAreaFor(model => model.Comments, new { @class = "input-xxlarge", rows = "5" })
                @Html.ValidationMessageFor(model => model.Comments)
            </div>
            
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12" id="CHECK">
            @{
                int page = (!string.IsNullOrEmpty(Request.Params["page"])?int.Parse(Request.Params["page"]):1);
                int pageSize = (!string.IsNullOrEmpty(Request.Params["pageSize"]) ? int.Parse(Request.Params["pageSize"]) : 20);
                var lst = NationalIT.DB.Entities.Trip_Info.Where(m => m.Customer_Info.Customer_ID == Model.Customer_ID).ToList();
            }
            @Html.Partial("_Trip_Info_Partial", new PagedList<NationalIT.Trip_Info>(lst,page,pageSize))
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="control-group">
                @Html.Partial("_ShowSaveEdit")
            </div>
        </div>
    </div>
    
    
}
